<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <!-- <meta name="viewport" content="width=devie-width,initial-sacle=1.0,user-scalable=no">
    meta -->
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
    <title>css粘连布局</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        html,body{
            height: 100%;
        }
        .wrap{
            min-height: 100%;
            background: pink;
        }
        .wrap .main{
            padding-bottom: 50px;
        }
        .footer{
            height: 50px;
            background-color: red;
            margin-top: -50px;
        }
    
    
    </style>
</head>
<body>
    <div class="wrap">
        <div class="main">
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
            main<br>
        </div>
    </div>
    <div class="footer">footer</div>
</body>
</html>